#include <iostream>
#include <cmath>
using namespace std;

int main() {
	const int width = 60;
	const int height = 30;
	const double scale = 0.1;
	const double step = 0.05;
	for (int y = height / 2; y >= -height / 2; y--) {
		for (int x = -width / 2; x <= width / 2; x++) {
			double x_scaled = x * scale;
			double y_scaled = y * scale;
			double heart = pow(x_scaled * x_scaled + y_scaled * y_scaled - 1, 3) - x_scaled * x_scaled * y_scaled * y_scaled * y_scaled;
			
			if (heart <= 0) {
				cout << "\033[31m*\033[0m";
			} else {
				cout << " ";
			}
		}
		cout << endl; 
	}
	
	return 0;
}
void drawCharHeart() {
    int i, j;
    int n = 6; 
    for (i = n / 2; i <= n; i += 2) {
        for (j = 1; j < n - i; j += 2) {
            cout << " ";
        }
        for (j = 1; j <= i; j++) {
            cout << "*";
        }
        for (j = 1; j <= n - i; j++) {
            cout << " ";
        }
        for (j = 1; j <= i; j++) {
            cout << "*";
        }
        cout << endl;
    }

    for (i = n; i >= 1; i--) {
        for (j = i; j < n; j++) {
            cout << " ";
        }
        for (j = 1; j <= (i * 2) - 1; j++) {
            cout << "*";
        }
        cout << endl;
    }

}
